import { request } from "@/axios/request";

// 根据医生id查询医生信息
export function getinformation(doctorId:number,sessionId:string){
    return request({
        url:'/api/health/doctor/verify/v1/findDoctorById',
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET'
    })

}

// 查询医生的问诊记录列表
export function getConsultationlist(doctorId:number,sessionId:string,config:object){
    return request({
        url:'/api/health/doctor/inquiry/verify/v1/findInquiryRecordList',
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET',
        params:config
    })
}
// 查询医生历史问诊记录列表
export function getHistory(doctorId:number,sessionId:string,config:object){
    return request({
        url:'/api/health/doctor/inquiry/verify/v1/findHistoryInquiryRecord',
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET',
        params:config
    })
}
// 结束问诊
export function getEnd(doctorId:number,sessionId:number,recordId:number){
    return request({
        url:'/api/health/doctor/inquiry/verify/v1/endInquiry',
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'PUT',
        params:{recordId}
    })
}
// 医生-发送消息（文本消息）
export function getchat(doctorId:number,sessionId:string,config:object){
    return request({
        url:"/api/health/doctor/inquiry/verify/v1/pushMessage",
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'POST',
        params:config
    })
}
// 查询问诊聊天记录
export function getRecord(doctorId:number,sessionId:string,configs:object){
    return request({
        url:'/api/health/doctor/inquiry/verify/v1/findInquiryDetailsList',
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET',
        params:configs
    })
}
// 查询历史问诊聊天记录 == 患者端
// export function getchatRecord(userId:number,sessionId:string,configs:object){
//   return request({
//     url:"/api/health/user/inquiry/verify/v1/findInquiryRecordList",
//     headers:{
//       userId:userId,
//       sessionId:sessionId,
//     },
//     method:'GET',
//     params:configs
//   })
// }
// 查询用户详细信息
export function getdetails(doctorId:number,sessionId:string,config:object){
    return  request({
        url:"/api/health/doctor/inquiry/verify/v1/findUserInfo",
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET',
        params:config
    })
}
// 查询医生收到的礼物列表
export function getGiftList(doctorId:number,sessionId:string,config:object){
    return request({
        url:"/api/health/doctor/verify/v1/findDoctorGiftList",
        headers:{
            doctorId:doctorId,
            sessionId:sessionId
        },
        method:'GET',
        params:config
    })
}